package com.agricultural.robot.chain;

import com.agricultural.robot.model.SafetyEvent;
import com.agricultural.robot.model.SafetyEventType;

/**
 * 故障检测处理器 - 责任链模式
 */
public class FaultDetectionHandler extends SafetyHandler {
    @Override
    public boolean canHandle(SafetyEventType type) {
        return type == SafetyEventType.DEVICE_FAULT;
    }

    @Override
    public void handleEvent(SafetyEvent event) {
        System.out.println("故障检测处理器: " + event.getMessage());
        System.out.println("执行故障处理流程...");
    }
}
